3.1.80 \(\int (a+b \log (c x^n))^2 \log (d (e+f x)^m) \, dx\) [80]

3.1.80.1 Optimal result
3.1.80.2 Mathematica [A] (verified)
3.1.80.3 Rubi [A] (verified)
3.1.80.4 Maple [C] (warning: unable to verify)
3.1.80.5 Fricas [F]
3.1.80.6 Sympy [F(-1)]
3.1.80.7 Maxima [F]
3.1.80.8 Giac [F]
3.1.80.9 Mupad [F(-1)]

3.1.80.1 Optimal result

Integrand size = 23, antiderivative size = 288 \[ \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=2 a b m n x-4 b^2 m n^2 x+2 b m n (a-b n) x+4 b^2 m n x \log \left (c x^n\right )-m x \left (a+b \log \left (c x^n\right )\right )^2-\frac {2 b e m n (a-b n) \log (e+f x)}{f}-2 a b n x \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-\frac {2 b^2 e m n \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )}{f}+\frac {e m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{f}-\frac {2 b^2 e m n^2 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{f}+\frac {2 b e m n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{f}-\frac {2 b^2 e m n^2 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{f} \]

output
2*a*b*m*n*x-4*b^2*m*n^2*x+2*b*m*n*(-b*n+a)*x+4*b^2*m*n*x*ln(c*x^n)-m*x*(a+ 
b*ln(c*x^n))^2-2*b*e*m*n*(-b*n+a)*ln(f*x+e)/f-2*a*b*n*x*ln(d*(f*x+e)^m)+2* 
b^2*n^2*x*ln(d*(f*x+e)^m)-2*b^2*n*x*ln(c*x^n)*ln(d*(f*x+e)^m)+x*(a+b*ln(c* 
x^n))^2*ln(d*(f*x+e)^m)-2*b^2*e*m*n*ln(c*x^n)*ln(1+f*x/e)/f+e*m*(a+b*ln(c* 
x^n))^2*ln(1+f*x/e)/f-2*b^2*e*m*n^2*polylog(2,-f*x/e)/f+2*b*e*m*n*(a+b*ln( 
c*x^n))*polylog(2,-f*x/e)/f-2*b^2*e*m*n^2*polylog(3,-f*x/e)/f
 
3.1.80.2 Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 507, normalized size of antiderivative = 1.76 \[ \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\frac {-a^2 f m x+4 a b f m n x-6 b^2 f m n^2 x-2 a b f m x \log \left (c x^n\right )+4 b^2 f m n x \log \left (c x^n\right )-b^2 f m x \log ^2\left (c x^n\right )+a^2 e m \log (e+f x)-2 a b e m n \log (e+f x)+2 b^2 e m n^2 \log (e+f x)-2 a b e m n \log (x) \log (e+f x)+2 b^2 e m n^2 \log (x) \log (e+f x)+b^2 e m n^2 \log ^2(x) \log (e+f x)+2 a b e m \log \left (c x^n\right ) \log (e+f x)-2 b^2 e m n \log \left (c x^n\right ) \log (e+f x)-2 b^2 e m n \log (x) \log \left (c x^n\right ) \log (e+f x)+b^2 e m \log ^2\left (c x^n\right ) \log (e+f x)+a^2 f x \log \left (d (e+f x)^m\right )-2 a b f n x \log \left (d (e+f x)^m\right )+2 b^2 f n^2 x \log \left (d (e+f x)^m\right )+2 a b f x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )-2 b^2 f n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+b^2 f x \log ^2\left (c x^n\right ) \log \left (d (e+f x)^m\right )+2 a b e m n \log (x) \log \left (1+\frac {f x}{e}\right )-2 b^2 e m n^2 \log (x) \log \left (1+\frac {f x}{e}\right )-b^2 e m n^2 \log ^2(x) \log \left (1+\frac {f x}{e}\right )+2 b^2 e m n \log (x) \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )+2 b e m n \left (a-b n+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )-2 b^2 e m n^2 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{f} \]

input
Integrate[(a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m],x]
 
output
(-(a^2*f*m*x) + 4*a*b*f*m*n*x - 6*b^2*f*m*n^2*x - 2*a*b*f*m*x*Log[c*x^n] + 
 4*b^2*f*m*n*x*Log[c*x^n] - b^2*f*m*x*Log[c*x^n]^2 + a^2*e*m*Log[e + f*x] 
- 2*a*b*e*m*n*Log[e + f*x] + 2*b^2*e*m*n^2*Log[e + f*x] - 2*a*b*e*m*n*Log[ 
x]*Log[e + f*x] + 2*b^2*e*m*n^2*Log[x]*Log[e + f*x] + b^2*e*m*n^2*Log[x]^2 
*Log[e + f*x] + 2*a*b*e*m*Log[c*x^n]*Log[e + f*x] - 2*b^2*e*m*n*Log[c*x^n] 
*Log[e + f*x] - 2*b^2*e*m*n*Log[x]*Log[c*x^n]*Log[e + f*x] + b^2*e*m*Log[c 
*x^n]^2*Log[e + f*x] + a^2*f*x*Log[d*(e + f*x)^m] - 2*a*b*f*n*x*Log[d*(e + 
 f*x)^m] + 2*b^2*f*n^2*x*Log[d*(e + f*x)^m] + 2*a*b*f*x*Log[c*x^n]*Log[d*( 
e + f*x)^m] - 2*b^2*f*n*x*Log[c*x^n]*Log[d*(e + f*x)^m] + b^2*f*x*Log[c*x^ 
n]^2*Log[d*(e + f*x)^m] + 2*a*b*e*m*n*Log[x]*Log[1 + (f*x)/e] - 2*b^2*e*m* 
n^2*Log[x]*Log[1 + (f*x)/e] - b^2*e*m*n^2*Log[x]^2*Log[1 + (f*x)/e] + 2*b^ 
2*e*m*n*Log[x]*Log[c*x^n]*Log[1 + (f*x)/e] + 2*b*e*m*n*(a - b*n + b*Log[c* 
x^n])*PolyLog[2, -((f*x)/e)] - 2*b^2*e*m*n^2*PolyLog[3, -((f*x)/e)])/f
 
3.1.80.3 Rubi [A] (verified)

Time = 0.61 (sec) , antiderivative size = 297, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2818, 6, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx\)

\(\Big \downarrow \) 2818

\(\displaystyle -f m \int \left (-\frac {2 n x \log \left (c x^n\right ) b^2}{e+f x}+\frac {2 n^2 x b^2}{e+f x}-\frac {2 a n x b}{e+f x}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e+f x}\right )dx+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-2 a b n x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )\)

\(\Big \downarrow \) 6

\(\displaystyle -f m \int \left (-\frac {2 n x \log \left (c x^n\right ) b^2}{e+f x}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{e+f x}+\frac {\left (2 b^2 n^2-2 a b n\right ) x}{e+f x}\right )dx+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-2 a b n x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle -f m \left (-\frac {2 b e n \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{f^2}-\frac {e \log \left (\frac {f x}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{f^2}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{f}+\frac {2 b e n (a-b n) \log (e+f x)}{f^2}-\frac {2 a b n x}{f}-\frac {2 b n x (a-b n)}{f}+\frac {2 b^2 e n \log \left (c x^n\right ) \log \left (\frac {f x}{e}+1\right )}{f^2}-\frac {4 b^2 n x \log \left (c x^n\right )}{f}+\frac {2 b^2 e n^2 \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{f^2}+\frac {2 b^2 e n^2 \operatorname {PolyLog}\left (3,-\frac {f x}{e}\right )}{f^2}+\frac {4 b^2 n^2 x}{f}\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )-2 a b n x \log \left (d (e+f x)^m\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+2 b^2 n^2 x \log \left (d (e+f x)^m\right )\)

input
Int[(a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m],x]
 
output
-2*a*b*n*x*Log[d*(e + f*x)^m] + 2*b^2*n^2*x*Log[d*(e + f*x)^m] - 2*b^2*n*x 
*Log[c*x^n]*Log[d*(e + f*x)^m] + x*(a + b*Log[c*x^n])^2*Log[d*(e + f*x)^m] 
 - f*m*((-2*a*b*n*x)/f + (4*b^2*n^2*x)/f - (2*b*n*(a - b*n)*x)/f - (4*b^2* 
n*x*Log[c*x^n])/f + (x*(a + b*Log[c*x^n])^2)/f + (2*b*e*n*(a - b*n)*Log[e 
+ f*x])/f^2 + (2*b^2*e*n*Log[c*x^n]*Log[1 + (f*x)/e])/f^2 - (e*(a + b*Log[ 
c*x^n])^2*Log[1 + (f*x)/e])/f^2 + (2*b^2*e*n^2*PolyLog[2, -((f*x)/e)])/f^2 
 - (2*b*e*n*(a + b*Log[c*x^n])*PolyLog[2, -((f*x)/e)])/f^2 + (2*b^2*e*n^2* 
PolyLog[3, -((f*x)/e)])/f^2)
 

3.1.80.3.1 Defintions of rubi rules used

rule 6
Int[(u_.)*((v_.) + (a_.)*(Fx_) + (b_.)*(Fx_))^(p_.), x_Symbol] :> Int[u*(v 
+ (a + b)*Fx)^p, x] /; FreeQ[{a, b}, x] &&  !FreeQ[Fx, x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2818
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))^(p_.), x_Symbol] :> With[{u = IntHide[(a + b*Log[c*x^n])^p, x]}, 
Simp[Log[d*(e + f*x^m)^r]   u, x] - Simp[f*m*r   Int[x^(m - 1)/(e + f*x^m) 
  u, x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && Inte 
gerQ[m]
 
3.1.80.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 35.05 (sec) , antiderivative size = 3710, normalized size of antiderivative = 12.88

method result size
risch \(\text {Expression too large to display}\) \(3710\)

input
int((a+b*ln(c*x^n))^2*ln(d*(f*x+e)^m),x,method=_RETURNVERBOSE)
 
output
(1/8*I*Pi*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)^2-1/8*I*Pi*csgn(I*(f*x+e)^ 
m)*csgn(I*d*(f*x+e)^m)*csgn(I*d)-1/8*I*Pi*csgn(I*d*(f*x+e)^m)^3+1/8*I*Pi*c 
sgn(I*d*(f*x+e)^m)^2*csgn(I*d)+1/4*ln(d))*(x*(I*b*Pi*csgn(I*c)*csgn(I*x^n) 
*csgn(I*c*x^n)-I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2-I*b*Pi*csgn(I*x^n)*csgn(I* 
c*x^n)^2+I*b*Pi*csgn(I*c*x^n)^3-2*b*ln(c)-2*a)^2+4*x*b^2*ln(x^n)^2-8*x*b^2 
*ln(x^n)*n+8*b^2*n^2*x-4*(I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*b*P 
i*csgn(I*c)*csgn(I*c*x^n)^2-I*b*Pi*csgn(I*x^n)*cs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left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \]

input
integrate((a+b*log(c*x^n))^2*log(d*(f*x+e)^m),x, algorithm="fricas")
 
output
integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)*log((f*x + e)^m*d), x 
)
 
3.1.80.6 Sympy [F(-1)]

Timed out. \[ \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\text {Timed out} \]

input
integrate((a+b*ln(c*x**n))**2*ln(d*(f*x+e)**m),x)
 
output
Timed out
 
3.1.80.7 Maxima [F]

\[ \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \]

input
integrate((a+b*log(c*x^n))^2*log(d*(f*x+e)^m),x, algorithm="maxima")
 
output
((b^2*e*m*log(f*x + e) - (f*m - f*log(d))*b^2*x)*log(x^n)^2 + (b^2*f*x*log 
(x^n)^2 - 2*((f*n - f*log(c))*b^2 - a*b*f)*x*log(x^n) - (2*(f*n - f*log(c) 
)*a*b - (2*f*n^2 - 2*f*n*log(c) + f*log(c)^2)*b^2 - a^2*f)*x)*log((f*x + e 
)^m))/f - integrate((((f^2*m - f^2*log(d))*a^2 - 2*(f^2*m*n - (f^2*m - f^2 
*log(d))*log(c))*a*b + (2*f^2*m*n^2 - 2*f^2*m*n*log(c) + (f^2*m - f^2*log( 
d))*log(c)^2)*b^2)*x^2 - (b^2*e*f*log(c)^2*log(d) + 2*a*b*e*f*log(c)*log(d 
) + a^2*e*f*log(d))*x + 2*(((f^2*m - f^2*log(d))*a*b - (2*f^2*m*n - f^2*n* 
log(d) - (f^2*m - f^2*log(d))*log(c))*b^2)*x^2 - (a*b*e*f*log(d) + (e*f*m* 
n - e*f*n*log(d) + e*f*log(c)*log(d))*b^2)*x + (b^2*e*f*m*n*x + b^2*e^2*m* 
n)*log(f*x + e))*log(x^n))/(f^2*x^2 + e*f*x), x)
 
3.1.80.8 Giac [F]

\[ \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \]

input
integrate((a+b*log(c*x^n))^2*log(d*(f*x+e)^m),x, algorithm="giac")
 
output
integrate((b*log(c*x^n) + a)^2*log((f*x + e)^m*d), x)
 
3.1.80.9 Mupad [F(-1)]

Timed out. \[ \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right ) \, dx=\int \ln \left (d\,{\left (e+f\,x\right )}^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2 \,d x \]

input
int(log(d*(e + f*x)^m)*(a + b*log(c*x^n))^2,x)
 
output
int(log(d*(e + f*x)^m)*(a + b*log(c*x^n))^2, x)